package tech.aistar.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 配置拦截器 全名接管springMvc
 */
@Configuration
public class WebConfigurer implements WebMvcConfigurer {
    @Autowired
    GuideLoginHandlerInterceptor guideLoginHandlerInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(guideLoginHandlerInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/css"); //排除路径
    }
}
